<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of my_auth
 *
 * @author Tuyet
 */
class my_auth extends CI_Session{
    var $CI;
    var $_model;
    function __construct() {
        parent::__construct();
        $CI =& get_instance();
        $this->_model=$CI;
        $this->_model->load->database();
        $this->_model->load->model("m_dangnhap");
    }
    function is_active($MaNguoiDung){
        if($this->_model->m_dangnhap->actived($MaNguoiDung))
            return true;
        else 
            return false;
    }
     function is_Login(){
        
        if($this->userdata("TenDangNhap") && $this->userdata("TenDangNhap")!=""
                && $this->userdata("MaNguoiDung") && $this->userdata("MaNguoiDung")!="")
            return TRUE;
        else
            return FALSE;
    }
     function __get($var)
    {
        return $this->userdata($var);

    }
    

    //put your code here
}

?>
